# _*_coding : UTF-8_*—_
class Hero:
    hero_hp=0
    hero_power=0
    hero_name=""
    def fight(self,enemy_hp,enemy_power,enemy_name):
        hero_final_hp = self.hero_hp - enemy_power
        enemy_final_hp = enemy_hp - self.hero_power
        #英雄血量多赢
        if hero_final_hp>enemy_final_hp:
            print(f'{self.hero_name}赢了')
        #敌人血量多赢
        elif hero_final_hp<enemy_final_hp:
            print(f'{enemy_name}赢了')
        else:
            print("平局")
#继承父类Hero
class Ez(Hero):
    hero_hp=1000
    hero_power=100
    hero_name = "EZ"
#继承父类Hero
class Jxin(Hero):
    hero_hp = 1100
    hero_power = 100
    hero_name = "Jxin"




